{% extends "base_generic.html" %}
{% block script %}
<script type="text/javascript">
  function generateUrl(name) {
    var sanitizedName = name;
    sanitizedName = string_to_slug(sanitizedName);
    $("#slugs").val(sanitizedName);
  }

</script>
{% endblock %}
{% block content %}
        <h1>Bulk KeyWord Uploader</h1>
        <form action="/admin/kws/{{ itemkey }}/save/" method="post">
        
        <div class="line en">
          <div class="field">
            <textarea id="words" name="words" type="text" cols="50" rows="30" onblur="generateUrl(this.value);"></textarea>
          </div>
          <div class="field">
            <textarea id="slugs" name="slugs" type="text" cols="50" rows="30"></textarea>
          </div>
        </div>

        <input type="submit" value="Guardar" id="save" name="save" /><br class="clear" />
      </form>
      <br class="clear" />

{% endblock %}
      